﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crosland.Automotriz.Facade.Interface;
using Crosland.Automotriz.Core;
using Crosland.Automotriz.Logic.Linq;
namespace Crosland.Automotriz.Facade.Facade
{
    public class FacadeRelacionarArticuloActualizar : iFacadeRelacionarArticuloActualizar
    {
        
        public IEnumerable<object> Buscar_Art_SusTop(string codMaeterial,int nu_rec)
        {
            clsTD_MaterialBL BL_TD_Material = new clsTD_MaterialBL();
            return BL_TD_Material.Buscar_Art_SusTop(codMaeterial, nu_rec);
            
        }

        public IEnumerable<object> Buscar_Art_SusTopKawasaki(string codMaeterial, int nu_rec)
        {
            clsTD_MaterialBL BL_TD_Material = new clsTD_MaterialBL();
            return BL_TD_Material.Buscar_Art_SusTopKawasaki(codMaeterial, nu_rec);

        }

        public bool Insertar(T_LOG_ARTICULO_RELACIONADO obj)
        {
            try
            {
             clsLog_Sus_ArtLogic BL_Log_Sus_ArtLogic = new clsLog_Sus_ArtLogic();
            return BL_Log_Sus_ArtLogic.Insertar(obj);
            }
            catch (Exception e)
            {
                
               throw new Exception("Error ", e);
            }
          
        }

        //public bool Eliminar(LOG_SUS_ART obj)
        //{
        //    clsLog_Sus_ArtLogic BL_Log_Sus_ArtLogic = new clsLog_Sus_ArtLogic();
        //    return BL_Log_Sus_ArtLogic.Eliminar(obj);
        //}

        public List<V_Log_Articulos_Relacionados> listarDetalle(string codArtMae)
        {
            clsLog_Sus_ArtLogic BL_Log_Sus_ArtLogic = new clsLog_Sus_ArtLogic();
            return BL_Log_Sus_ArtLogic.listarDetalle(codArtMae);
        }

        public bool PA_EliminarDetalle(string cod_material, string cod_material_sus)
        {
            clsLog_Sus_ArtLogic BL_Log_Sus_ArtLogic = new clsLog_Sus_ArtLogic();
            return BL_Log_Sus_ArtLogic.PA_EliminarDetalle(cod_material, cod_material_sus);
        }

        public List<T_LOG_ARTICULO_RELACIONADO_TIPO> listarMae()
        {
            clsLog_Sus_ArtLogic BL_Log_Sus_ArtLogic = new clsLog_Sus_ArtLogic();
            return BL_Log_Sus_ArtLogic.listarMae();
        }
       
    }
}
